package com.xin.net
{
import flash.events.Event;
import flash.utils.ByteArray;

public class XMLLoader extends LoaderBase
{
	private var _xml:XML;
	
	public function XMLLoader(url:String)
	{
		super(url);
	}
	
	protected override function onComplete():void
	{
		var byteArray:ByteArray = getByteArray();
		
		var s:String = byteArray.readUTFBytes(byteArray.length);
		_xml = new XML(s);
		
		dispatchEvent(new Event(Event.COMPLETE));
	}
	
	public function getXML():XML
	{
		return _xml;
	}
}
}